<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
        content="width=device-width,initial-scale=1.0,viewport-fit=cover,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <title>名医讲习所</title>
    <script src="js/rem.js"></script>
    <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css" />
    <link rel="stylesheet" href="css/weui.min.css">
    <link rel="stylesheet" href="css/jquery-weui.min.css">
    <link rel="stylesheet" href="css/public.css">
    <link rel="stylesheet" href="css/ot-doctor-relevant.css">
    <script>(function () { var _53code = document.createElement("script"); _53code.src = "https://tb.53kf.com/code/code/96d8f960b261e49515450f8953b044bc5/1"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(_53code, s); })();</script>
</head>

<body>
    <div class="pub_bar" title="名医讲习所" left="back" right="menu"></div>
    <!--  -->
    <div class="pub-container has-tabbar bgwhite">
        <div class="relevant_msg space-border">
        </div>
        <!-- 医生简介 -->
        <div class="relevant_cont space-border">
            <div class="relevant_cont_p1"><img src="./image/hxl/hxl-doctor09.png" alt="">医生简介</div>
            <div class="relevant_cont_p2 text-cut-two"></div>
            <img class="relevant_cont_more" src="./image/hxl/hxl-bottom.png" alt="">
        </div>
        <!-- 医生相关 - 开始听课 -->
        <div class="hxl_tabs space-border">
            <div class="tabs_item active">医生相关</div>
            <div class="tabs_item">开始听课</div>
        </div>
        <!-- 列表 -->
        <div class="relevant_listing">
            <div class="relevant_list relevant_list1" style="display: block;">
                <div class="pub_small_header plr15">
                    <a href="#">
                        <div class="title">精彩瞬间</div>
                        <div class="right">共有7节系列课程<img src="./image/hxl/hxl-right.png" alt=""></div>
                    </a>
                </div>
                <div class="item space-border">
                    <a href="./ot-doctor-video.html">
                        <div class="item_img">
                            <img src="/image/placeholder/1.jpg" alt="">
                            <p>开讲时间:2021/02/20/13:00-16:00</p>
                        </div>
                        <div class="item_cont">
                            <p class="text-cut-one">XXX医生课程精彩瞬间</p>
                            <div><img src="./image/hxl/hxl-doctor08.png" alt="">100+</div>
                        </div>
                    </a>
                </div>
            </div>
            <div class="relevant_list relevant_list2">
            </div>
        </div>
        <div class="weui-loadmore" id="loadMore">
            <i class="weui-loading"></i>
            <span class="weui-loadmore__tips">正在加载</span>
        </div>
        <div class="weui-loadmore weui-loadmore_line hide" id="noMore">
            <span class="weui-loadmore__tips">没有更多数据了</span>
        </div>
    </div>
    <!-- 公共footer -->
    <div class="pub-footer">
        <ul class="tabs">
            <li class="tab-classroom"><a href="./ot-classroom-index.html">首页</a></li>
            <li class="tab-doctor active"><a href="./ot-doctor-index.html">名医</a></li>
            <li class="tab-curriculum"><a href="./ot-curriculum-index.html">课程</a></li>
            <li class="tab-forum"><a href="#">讲堂</a></li>
            <li class="tab-consultation"><a href="#">会诊</a></li>
            <li class="tab-user"><a href="javascript:;">我的</a></li>
        </ul>
    </div>
    <script src="https://g.alicdn.com/de/prismplayer/2.9.3/aliplayer-h5-min.js"></script>
    <script src="js/jquery-3.6.0.min.js"></script>
    <script src="js/jquery-weui.min.js"></script>
    <script src="js/md5.js"></script>
    <script src="js/public.js"></script>
    <script>
        let id = getQueryString('id')

        $(document).on('click', '.relevant_cont_more', function () {
            if ($(this).prev().hasClass('active')) {
                $(this).removeClass('active')
                $(this).prev().removeClass('active')
            } else {
                $(this).addClass('active')
                $(this).prev().addClass('active')
            }
        })

        getData()
        function getData() {
            gethttp('/ld/courses?type=c:doctor', {
                data: {
                    doctor: id
                },
                success: function (res) {
                    console.log(res)
                    let doctor = res.data.doctor
                    let list = res.data.list
                    let arr = []

                    $('.relevant_msg').html(`<div class="relevant_msg_p1">${doctor.learnedPeopleUi}人正在学习｜${doctor.playTimesUi}万次播放｜${doctor.createdAtUi}上线</div>
                                            <div class="relevant_msg_p2">${doctor.name} ${doctor.competent.name}</div>
                                            <div class="relevant_msg_p3">${doctor.hospital} 科室</div>
                                            <div class="relevant_msg_p4">${doctor.tagUi.join(',')}</div>`)
                    $('.relevant_cont_p2').html(doctor.desciption)

                    list.forEach((item, index) => {
                        let html = `<a href="./ot-classroom-play.html?id=${item.id}">
                                        <div class="item space-border">
                                            <div class="item_img">
                                                <img src="${item.imageUrl}" alt="">
                                                <p>共${item.serieCount}系列</p>
                                            </div>
                                            <div class="item_cont">
                                                <p class="item_p1">${item.name}</p>
                                                <div class="item_msg">
                                                    <p>${item.createdAtUi}</p>
                                                    <div><img src="./image/hxl/hxl-doctor08.png" alt="">${item.likeTimesUi}</div>
                                                </div>
                                            </div>
                                        </div>
                                    </a>`
                        arr.push(html)
                    });
                    $('.relevant_list2').html(arr)
                }
            })
        }
    </script>
</body>

</html>